package day20170427.kaoshi;

import static org.junit.Assert.*;

import java.util.Date;
import java.util.List;

import org.junit.Test;

public class StudentXMLTest {
	private StudentDao dao = new StudentDaoImpl();
	
	@Test
	public void addTest() throws Exception {
		String id = String.valueOf(new Date().getTime());
		Student student = new Student(id,"张三",88);
		boolean result = dao.add(student);
		if(result){
			System.out.println("增加成功...");
		}else{
			System.out.println("增加失败...");
		}
	}
	
	@Test
	public void finalAllStudent() throws Exception {
		List<Student> list = dao.findAllStudent();
		for(Student student : list){
			System.out.println(student);
		}
	}
}
